package com.zsj.zsjkotlinmvvm.data.model.repository



data class VideoResponseData(
    var code: Int,
    var message: String,
    var result: VideoResultData
)


data class VideoResultData(
    var total: Int,
    var list: List<VideoData>
)


data class VideoData(
    val id: Int,
    val title: String,
    val userName: String,
    val userPic: String,
    val coverUrl: String,
    val playUrl: String,
    val duration: String
)

object VideoMapper {

    fun toVideoData(data: VideoResponseData): VideoResponseData =
        VideoResponseData(
            code = data.code,
            message = data.message ?: "",
            result = data.result
        )

}